<?php
/**
 * 前端回写日志
 *
 * @author hzjsq@msn.com
 * @version 0.1b
 */
$db['alipay_trade'] = array(
    'columns' =>
    array(
        'id' =>
        array (
          'type' => 'int(10)',
          'required' => true,
          'pkey' => true,
          'extra' => 'auto_increment',
          'editable' => false,
          'label' => 'ID',
          'comment' => app::get('ome')->_('ID'),
        ),
        'trade_no' =>
        array(
            'type' => 'varchar(64)',
            'required' => true,
            'editable' => false,
            'default_in_list' => true,
            'in_list' => true,
            'label' => '支付宝交易号',
            'comment' => '支付宝交易号',
        ),
        'out_trade_no' =>
        array(
            'type' => 'varchar(64)',
            'required' => true,
            'editable' => false,
            'default_in_list' => true,
            'in_list' => true,
            'label' => '商家订单号',
            'comment' => '商家订单号',
        ),
        'buyer_logon_id' =>
        array(
            'type' => 'varchar(100)',
            'required' => true,
            'editable' => false,
            'default_in_list' => true,
            'in_list' => true,
            'label' => '买家支付宝账号',
            'comment' => '买家支付宝账号',
        ),
        'trade_status' =>
        array(
            'type' => 'varchar(32)',
            'required' => true,
            'editable' => false,
            'default_in_list' => true,
            'in_list' => true,
            'label' => '交易状态',
            'comment' => '交易状态',
        ),
        'total_amount' =>
        array(
            'type' => 'money',
            'required' => true,
            'editable' => false,
            'default_in_list' => true,
            'in_list' => true,
            'label' => '订单金额',
            'comment' => '订单金额',
        ),
        'trans_currency' =>
        array(
            'type' => 'varchar(8)',
            'editable' => false,
            'default_in_list' => true,
            'in_list' => true,
            'label' => '标价币种',
            'comment' => '标价币种',
        ),
        'settle_currency' =>
        array(
            'type' => 'varchar(8)',
            'editable' => false,
            'default_in_list' => true,
            'in_list' => true,
            'label' => '结算币种',
            'comment' => '结算币种',
        ),
        'settle_amount' =>
        array(
            'type' => 'money',
            'editable' => false,
            'default_in_list' => true,
            'in_list' => true,
            'label' => '结算金额',
            'comment' => '结算金额',
        ),
        'pay_currency' =>
        array(
            'type' => 'varchar(8)',
            'editable' => false,
            'default_in_list' => true,
            'in_list' => true,
            'label' => '订单支付币种',
            'comment' => '订单支付币种',
        ),
        'pay_amount' =>
        array(
            'type' => 'money',
            'editable' => false,
            'default_in_list' => true,
            'in_list' => true,
            'label' => '支付订单金额',
            'comment' => '支付订单金额',
        ),
        'settle_trans_rate' =>
        array(
            'type' => 'money',
            'editable' => false,
            'default_in_list' => true,
            'in_list' => true,
            'label' => '结算汇率',
            'comment' => '结算汇率',
        ),
        'trans_pay_rate' =>
        array(
            'type' => 'money',
            'editable' => false,
            'default_in_list' => true,
            'in_list' => true,
            'label' => '标价汇率',
            'comment' => '标价汇率',
        ),
        'buyer_pay_amount' =>
        array(
            'type' => 'money',
            'editable' => false,
            'default_in_list' => true,
            'in_list' => true,
            'label' => '实付金额',
            'comment' => '实付金额',
        ),
        'point_amount' =>
        array(
            'type' => 'money',
            'editable' => false,
            'default_in_list' => true,
            'in_list' => true,
            'label' => '积分支付金额',
            'comment' => '积分支付金额',
        ),
        'invoice_amount' =>
        array(
            'type' => 'money',
            'editable' => false,
            'default_in_list' => true,
            'in_list' => true,
            'label' => '发票金额',
            'comment' => '发票金额',
        ),
        'send_pay_date' =>
        array(
            'type' => 'time',
            'editable' => false,
            'default_in_list' => true,
            'in_list' => true,
            'label' => '打款卖家时间',
            'comment' => '打款卖家时间',
        ),
        'store_name' =>
        array(
            'type' => 'varchar(512)',
            'editable' => false,
            'default_in_list' => true,
            'in_list' => true,
            'label' => '商户名称',
            'comment' => '商户名称',
        ),
        'buyer_user_id' =>
        array(
            'type' => 'varchar(16)',
            'editable' => false,
            'default_in_list' => true,
            'in_list' => true,
            'label' => '支付宝用户id',
            'comment' => '支付宝用户id',
        ),
        'auth_trade_pay_mode' =>
        array(
            'type' => 'varchar(16)',
            'editable' => false,
            'default_in_list' => true,
            'in_list' => true,
            'label' => '预授权支付模式',
            'comment' => '预授权支付模式',
        ),
        'buyer_user_type' =>
        array(
            'type' => 'varchar(16)',
            'editable' => false,
            'default_in_list' => true,
            'in_list' => true,
            'label' => '买家用户类型',
            'comment' => '买家用户类型',
        ),
        'mdiscount_amount' =>
        array(
            'type' => 'money',
            'editable' => false,
            'default_in_list' => true,
            'in_list' => true,
            'label' => '商家优惠金额',
            'comment' => '商家优惠金额',
        ),
        'discount_amount' =>
        array(
            'type' => 'money',
            'editable' => false,
            'default_in_list' => true,
            'in_list' => true,
            'label' => '平台优惠金额',
            'comment' => '平台优惠金额',
        ),
        
    ),
  'index' =>
     array (
         'ind_id' =>
         array (
             'columns' =>
             array (
                 0 => 'id',
             ),
         ),
   ),
    'comment' => '支付宝交易流水',
    'engine' => 'innodb',    'version' => '$Rev:  $',
);